package cn.da.shuai.cool.finance.model;

import cn.da.shuai.cool.common.entity.EntityBase;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;

/**
 * <p>
 * 成本核算表
 * </p>
 *
 * @author 大帅哥
 * @since 2023-05-01
 */
@Getter
@Setter
@TableName("cool_cost_accounting")
@Schema(name = "CoolCostAccounting", description = "成本核算表")
public class CoolCostAccounting extends EntityBase {

    @Schema(description = "主键ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "成本对象ID（产品ID或项目ID）")
    @TableField("cost_object_id")
    private Long costObjectId;

    @Schema(description = "成本对象类型：PRODUCT-产品，PROJECT-项目")
    @TableField("cost_object_type")
    private String costObjectType;

    @Schema(description = "成本类型：DIRECT_MATERIAL-直接材料，DIRECT_LABOR-直接人工，MANUFACTURING_OVERHEAD-制造费用")
    @TableField("cost_type")
    private String costType;

    @Schema(description = "成本金额")
    @TableField("amount")
    private BigDecimal amount;

    @Schema(description = "会计期间（格式：YYYY-MM）")
    @TableField("accounting_period")
    private String accountingPeriod;
}